/*
 * GPUC
 * 
 * Copyright © 2008 Attila T. Áfra <attila.afra@gmail.com>
 * 
 * This program is free software: you can redistribute it and/or modify it under the terms of the
 * GNU General Public License as published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
 * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along with this program. If
 * not, see <http://www.gnu.org/licenses/>.
 */

#ifndef _GPUC_COMMON_H
#define _GPUC_COMMON_H

#include <stddef.h>

/*------------------------------------------------------------------------------------------------*/

#define GPUC_API

/*------------------------------------------------------------------------------------------------*/

/// Boolean
typedef int GPUC_Bool;

/*------------------------------------------------------------------------------------------------*/

/// Error type
typedef enum
{
    GPUC_Error_None,
    GPUC_Error_NotInitialized,
    GPUC_Error_Unknown,
    GPUC_Error_InvalidOperation,
    GPUC_Error_InvalidArgument,
    GPUC_Error_OutOfMemory,
    GPUC_Error_CompileFailed,
    GPUC_Error_UnsupportedDevice,
    GPUC_Error_UnsupportedStreamSize,
    GPUC_Error_UnsupportedStreamType,
    GPUC_Error_UnsupportedStreamCount
}
GPUC_Error;

/*------------------------------------------------------------------------------------------------*/

/// Data type
typedef enum
{
    GPUC_Type_Stream,
    GPUC_Type_Float,
    GPUC_Type_Float2,
    GPUC_Type_Float3,
    GPUC_Type_Float4,
    GPUC_Type_Half,
    GPUC_Type_Half2,
    GPUC_Type_Half3,
    GPUC_Type_Half4,
    GPUC_Type_Int,
    GPUC_Type_Int2,
    GPUC_Type_Int3,
    GPUC_Type_Int4,
    GPUC_Type_Bool,
    GPUC_Type_Bool2,
    GPUC_Type_Bool3,
    GPUC_Type_Bool4,
    GPUC_Type_Byte,
    GPUC_Type_Byte2,
    GPUC_Type_Byte3,
    GPUC_Type_Byte4,
    GPUC_Type_Float2x2,
    GPUC_Type_Float3x3,
    GPUC_Type_Float4x4
}
GPUC_Type;

/*------------------------------------------------------------------------------------------------*/

/// Access
typedef enum
{
    GPUC_Access_Read,
    GPUC_Access_Write,
    GPUC_Access_ReadWrite
}
GPUC_Access;

/*------------------------------------------------------------------------------------------------*/

/// Rectangle
typedef struct
{
    int x;
    int y;
    int width;
    int height;
}
GPUC_Rectangle;

/*------------------------------------------------------------------------------------------------*/

GPUC_API GPUC_Error
GPUC_getError();

/*------------------------------------------------------------------------------------------------*/

#endif // _GPUC_COMMON_H
